<?php
declare (strict_types = 1);

namespace app\service;

use app\model\AccountRecordCategoryRelModel;

class AccountRecordCategoryRelService extends \think\Service
{
    /**
     * 添加关联关系
     */
    public function create($data)
    {
        $res = AccountRecordCategoryRelModel::create($data);
        return $res;
    }

    /**
     * 修改账单
     * @param $data
     */
    public function update($data)
    {
        $res = AccountRecordCategoryRelModel::where('id', $data['id'])->update($data);
        return $res;
    }

    /**
     * 伪删除关联关系
     */
    public function delete($data)
    {
        $res = AccountRecordCategoryRelModel::where('id', $data['id'])->update(['is_delete'=>2]);
        return $res;
    }
}
